API documentation
Integrations
Analytics
Billable events
Companies
Coupons > Promotion codes
Custom properties
Customers
Customers > Credits
Customers > Payment methods
Integrations
Invoices
Invoices > Transactions
Invoicing entities
Organisations
Payments
Price configurations
Products
Quotes
Subscriptions
- GETGet subscriptions
- GETGet subscription
- GETGet subscription phases
- GETGet subscription phase
- POSTCreate subscription update
- POSTCreate subscription updates
- POSTCreate subscription
- PUTUpdate subscription
- POSTActivate subscription
- POSTCancel subscription
- POSTPause subscription
- POSTReactivate subscription
- POSTRefresh seat products
- POSTRefresh subscriptions
- POSTReinstate subscription
- POSTTransition subscription to next phase
Third-party apps
Wallets
Customers > Credits
Create credit product
Create a credit entity for a given product with an optional balance for a customer.
POST
/
v1
/
customers
/
{id}
/
credits
curl --request POST \
--url https://api.hyperline.co/v1/customers/{id}/credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"product_id": "itm_3kXODDF42QXtnL",
"current_balance": 2000,
"name": "Credit name",
"low_count_threshold": 10
}'
{
"product_id": "itm_3kXODDF42QXtnL",
"current_balance": 2000,
"customer_id": "cus_Typ0px2W0aiEtl",
"name": "Credit name",
"low_count_threshold": 10,
"last_refreshed_at": "2024-11-23T09:00:01.860Z",
"created_at": "2024-10-12T07:00:01.860Z",
"updated_at": "2024-10-13T10:00:01.860Z"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Body
application/json
Create credit payload
The body is of type object
.
Response
201 - application/json
Credit created
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.hyperline.co/v1/customers/{id}/credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"product_id": "itm_3kXODDF42QXtnL",
"current_balance": 2000,
"name": "Credit name",
"low_count_threshold": 10
}'
{
"product_id": "itm_3kXODDF42QXtnL",
"current_balance": 2000,
"customer_id": "cus_Typ0px2W0aiEtl",
"name": "Credit name",
"low_count_threshold": 10,
"last_refreshed_at": "2024-11-23T09:00:01.860Z",
"created_at": "2024-10-12T07:00:01.860Z",
"updated_at": "2024-10-13T10:00:01.860Z"
}
Assistant
Responses are generated using AI and may contain mistakes.